Skip to content

[yaml] fix documentation and tests for flags - #40617

Open
derrickaw wants to merge 2 commits into
apache:masterfrom
derrickaw:20261015_fixTestCliFlag
Open

derrickaw wants to merge 2 commits into
apache:masterfrom
derrickaw:20261015_fixTestCliFlag

Conversation

@derrickaw

Copy link
Copy Markdown
Collaborator

Fixes #37980 and some minor typos.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.81%. Comparing base (76f6e6d) to head (9cd5926).
⚠️ Report is 394 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #40617       +/-   ##
=============================================
+ Coverage     56.16%   79.81%   +23.64%     
=============================================
  Files          1124      494      -630     
  Lines        178336    83581    -94755     
  Branches       1489        0     -1489     
=============================================
- Hits         100170    66710    -33460     
+ Misses        75645    16871    -58774     
+ Partials       2521        0     -2521     
Flag Coverage Δ
go ?
java ?
python 79.81% <ø> (+0.25%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@derrickaw

Copy link
Copy Markdown
Collaborator Author

/gemini review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR updates the Beam YAML testing documentation to explicitly note that both --tests and --test CLI flags are supported, fixes minor typos in the documentation, and expands unit test coverage in main_test.py to verify argument parsing and test execution for both flag variants.

🔍 General Feedback

  • The unit test additions in sdks/python/apache_beam/yaml/main_test.py cleanly validate both --tests and --test flags via _parse_arguments and run_tests.
  • Documentation updates and typo fixes in website/www/site/content/en/documentation/sdks/yaml-testing.md are clear and accurate.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@derrickaw
derrickaw marked this pull request as ready for review October 15, 2026 18:00
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @chamikaramj for label yaml.
Backup reviewer: Abacn (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).


def test_inline_test_specs(self):
main.run_tests(['--yaml_pipeline', TEST_PIPELINE, '--test'], exit=False)
for flag in ['--tests', '--test']:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have 2 different ways of doing this? Could you add some context?

@derrickaw derrickaw Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Originally --test was added.
  2. Then docs were added stating --tests was to be used.
  3. Another person added --tests and kept the backward compatible --test.
  4. This PR completes the cycle with improved testing for both flags and update documentation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok - I think the alias is fine (it probably would've been better to just update the docs, but that ship has sailed). But instead of alluding to both in our docs, lets just pick one and make sure all of our docs use that. I don't care which one we choose, but I think mentioning both (or switching back and forth) will just confuse users and lead them to wonder which one they should choose.

Keeping the main_test.py change is fine

@derrickaw derrickaw Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok removed the --test change. Thanks

@chamikaramj

Copy link
Copy Markdown
Contributor

waiting on author

@github-actions github-actions Bot added the size/s S: 10-49 lines changed label Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YAML Test CLI flag mismatch

3 participants